home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / demo / rotplnnr.lha / mui.c < prev    next >
C/C++ Source or Header  |  1994-07-11  |  552b  |  30 lines

  1. void __regargs __autoopenfail(char *);
  2.  
  3. #include <constructor.h>
  4. #include <proto/exec.h>
  5. #include <proto/muimaster.h>
  6.  
  7. struct Library *MUIMasterBase;
  8. static void *libbase;
  9. extern long __oslibversion;
  10.  
  11. CBMLIB_CONSTRUCTOR(openmui)
  12.   {
  13.   libbase=MUIMasterBase=(void *)OpenLibrary("muimaster.library",8);
  14.   if(MUIMasterBase == NULL)
  15.     {
  16.     __autoopenfail("muimaster.library");
  17.     return 1;
  18.     }
  19.   return 0;
  20.   }
  21.  
  22. CBMLIB_DESTRUCTOR(closemui)
  23.   {
  24.   if(libbase)
  25.     {
  26.     CloseLibrary((struct Library *)libbase);
  27.     libbase=MUIMasterBase=NULL;
  28.     }
  29.   }
  30.